//
//  rightSecondTableViewCell.m
//  Project_A Gary
//
//  Created by leilei on 16/4/6.
//  Copyright © 2016年 www.lei.com. All rights reserved.
//

#import "rightSecondTableViewCell.h"

@implementation rightSecondTableViewCell

-(void)dealloc
{
    [_title release];
    [_nickname release];
    [_userface release];
    [_picOne release];
    [_picTwo release];
    [_picThree release];
    [super dealloc];
    
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.title = [[UILabel alloc] init];
        self.title.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.title];
        self.title.font = [UIFont systemFontOfSize:16];
        self.title.numberOfLines = 0;
        [_title release];
        
        self.nickname =[[UILabel alloc] init];
        self.nickname.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.nickname];
        self.nickname.textColor = [UIColor blueColor];
        self.nickname.font = [UIFont systemFontOfSize:14];
        [_nickname release];
        
        self.userface = [[UIImageView alloc] init];
        self.userface.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:self.userface];
        [_userface release];

        self.picOne = [[UIImageView alloc] init];
        self.picOne.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.picOne];
        [_picOne release];
        
        self.picTwo = [[UIImageView alloc] init];
        self.picTwo.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.picTwo];
        [_picTwo release];
        
        self.picThree = [[UIImageView alloc] init];
        self.picThree.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.picThree];
        [_picThree release];
        
//        for (NSInteger i = 0; i < 3; i++) {
//            UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(110 * i , 0, 100, 120)];
//            [self.contentView addSubview:imageView];
//            imageView.hidden = YES;
//            imageView.backgroundColor = [UIColor redColor];
//            imageView.tag = 1000 + i;
//            [imageView release];
//        }
        
        
    }
    return self;
}




- (void)layoutSubviews
{
    [super layoutSubviews];
    self.userface.frame = CGRectMake(10, 20, 50, 50);
    self.nickname.frame = CGRectMake(70, 15, 150, 20);
    self.title.frame = CGRectMake(70, 45, 300, 30);
    
    self.picOne.frame = CGRectMake(70, 95, 80, 80);
    self.picTwo.frame = CGRectMake(160, 95, 80, 80);
    self.picThree.frame = CGRectMake(250, 95, 80, 80);
    
}



//- (void)setImageArray:(NSArray *)imageArray {
//
//    
//    if (_imageArray != imageArray) {
//        [_imageArray release];
//        _imageArray = [imageArray retain];
//        NSInteger count = imageArray.count;
//        
////        for (NSInteger i = 0; i < 3; i ++) {
////            UIImageView *imageView = [self.contentView viewWithTag:1000 + i];
////            imageView.hidden = YES;
////        }
//        
//        for (NSInteger i = 0; i < 3; i ++) {
//            UIImageView *imageView = [self.contentView viewWithTag:1000 + i];
//            if (i < count) {
//                
//                [imageView sd_setImageWithURL:[NSURL URLWithString:imageArray[i][@"url"]]];
//                imageView.hidden = NO;
//            } else {
//                imageView.hidden = YES;
//            }
//            
//        }
//        
//        
//        
//    }
//}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
